﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OracleClient;
using System.Data;
using System.Configuration;

namespace database
{
       
    class DBUtils
    {
        private string OracleConnStr = ConfigurationManager.AppSettings["conn"];
        private OracleConnection conn;
   

        public DBUtils()
        {
            conn = new OracleConnection(OracleConnStr);
        }

        public void ConnOpen()
        {
            conn.Open();
        }

        public void ConnClose()
        {
            conn.Close();
        }

        public OracleConnection getConn()
        {
            return conn;
        }


        /** 
         * 连接数据库函数
         */
        public static bool DBConnect()
        {
            //如果连接数据库成功
            return true;
        }

        public static void DBClose()
        {
            //关闭数据库连接
        }
    }
}
